import uuid
from sqlalchemy import Column, Integer, String
from core.database import Base


class Devices(Base):
    __tablename__ = "devices"
    id = Column(Integer, primary_key=True, autoincrement= True,comment="主键ID")
    device_id = Column(String(36), nullable=False,unique=True, default=lambda :str(uuid.uuid4()),comment="设备ID")
    user_id = Column(String(36), nullable=False,comment="用户ID")
    microphone_name = Column(String(100), nullable=False,comment="麦克风")
    speaker_name = Column(String(100), nullable=False,comment="扬声器")
    device_phone = Column(String(20), nullable=False,comment="设备电话")
    template_id = Column(String(36), nullable=True,comment="模板ID")

